var express = require('express')
const router = express.Router()
const path = require('path')
const fs = require('fs')


router.use(function(req, res, next){
    next()
})
router.get('/mall', function(req, res){
    var file = path.join(__dirname, '../', '/JSON/test.json'); //文件路径，__dirname为当前运行js文件的目录
	
	//读取json文件
    fs.readFile(file, 'utf-8', function(err, data) {
        if (err) {
            res.send('文件读取失败');
        } else {
            console.log(data)
            res.send(data);
        }
    });
})
router.post('/doctor/listDoctorPrice', function(req, res){
    var obj = {
        "auditCode": "sed Ut ullamco",
        "auditName": "cillum dolor aliquip adipisicing sit",
        "auditNpReason": "ea do consectetur voluptate ut",
        "auditResult": "Excepteur exercitation aute",
        "auditTime": "1986-08-28T10:15:57.918Z",
        "bankCardCode": "est",
        "bankCityCode": "nisi in",
        "bankCityName": "pariatur",
        "bankName": "ullamco deserunt",
        "bankProvinceCode": "Ut",
        "bankProvinceName": "temp",
        "briefIntroduction": "magna in ex aute",
        "cityCode": "sunt nostrud",
        "cityName": "commodo irure amet",
        "commitTime": "1980-09-20T07:35:10.79Z",
        "countyCode": "voluptate in id esse",
        "countyName": "aliquip dolore in velit",
        "createTime": "1984-05-25T16:55:51.101Z",
        "createUserCode": "anim exercitation nulla sint",
        "createUserName": "deserunt mollit sit occaecat exercitation",
        "currentPermiss": "et reprehenderit",
        "deptCode": "dolore consectetur amet",
        "deptCode2": "culpa anim magna sit ad",
        "deptName": "nostrud",
        "deptName2": "外科",
        "detailedAddress": "sint minim pariatur incididunt nisi",
        "doctorCode": "dolor in aute",
        "doctorName": "测试名称",
        "doctorTitleCode": "consequat et dolor e",
        "doctorTitleName": "主治医生",
        "goodAt": "nostrud",
        "id": "dolor eiusmod Duis",
        "idCardCode": "nisi Duis",
        "isAudited": "culpa Duis cillum",
        "isRealName": "enim adipisicing non velit",
        "online": -82836472,
        "orgCode": "culpa dolore dolore",
        "orgLevel": "in sed dolore minim",
        "orgLevelName": "officia",
        "orgName": "北京市某某医院名称",
        "phoneNumber": "voluptate velit",
        "portraitFileId": "est minim ipsum",
        "portraitFilePath": "https://oss-dx-sit.oss-cn-shanghai.aliyuncs.com/sysFile/DPC/18738170277/20200320/8be58375768744a69cc62e80bd5170e2.jpg",
        "provinceCode": "velit",
        "provinceName": "ea enim",
        "recommendUserId": "qui amet ipsum dolor est",
        "registerSourceCode": "qui do pariatur nulla laboris",
        "registerSourceName": "non irure id quis",
        "registerTime": "1973-05-14T21:18:54.219Z",
        "remark": "cupidatat laborum",
        "serviceCount": 63848924,
        "servicePrice": 4303154.183970064,
        "sex": "cillum amet",
        "startRate": "est sunt",
        "status": "labore culpa dolore",
        "updateTime": "1997-04-03T19:29:10.863Z",
        "updateUserCode": "voluptate",
        "updateUserName": "sint qui nulla irure",
        "version": "dolor cillum nisi"
    }
    var data = [obj,obj,obj,obj]
    res.send({
        code: 0,
        list: data
    });
})
module.exports = router